{{template "header.html" .UIUtils.Slice "" "home"}}
<div id="fb-root"></div>
<script>(function(d, s, id) {
  var js, fjs = d.getElementsByTagName(s)[0];
  if (d.getElementById(id)) return;
  js = d.createElement(s); js.id = id;
  js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));

window.fbAsyncInit = function() {
	FB.Event.subscribe('edge.create', like_callback);
	FB.Event.subscribe('edge.remove', unlike_callback);
}
</script>
<div itemscope itemtype="http://schema.org/WebApplication">
<h1>
    <span itemprop="name">Go Search</span>
</h1>
<meta itemprop="url" content="http://go-search.org/"></meta>
<meta itemprop="applicationCategory" content="Search Engine"></meta>
{{template "searchbox.html" .UIUtils.Slice "" true}}
{{if .}}
<div class="info">
    <a href="/search">{{.TotalDocs}}</a> golang packages in {{.TotalProjects}} projects indexed,
    last updated {{.IndexAge}} ago.
    <div style="vertical-align: middle" class="fb-like" data-href="http://go-search.org/" data-send="false" data-layout="button_count" data-width="450" data-show-faces="true"></div>
    <div class="g-plusone" data-size="small" data-href="http://go-search.org/" data-callback="plusone_callback"></div>
</div>
</div>
<script type="text/javascript">
  (function() {
    var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
    po.src = 'https://apis.google.com/js/plusone.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
  })();
</script>

<script>
function plusone_callback(e) {
    ga('send', 'event', 'plusone', 'go-search', e.state);
}
function like_callback(url, html_element) {
    ga('send', 'event', 'like', 'go-search', 'like');
}
function unlike_callback(url, html_element) {
    ga('send', 'event', 'like', 'go-search', 'unlike');
}
</script>
{{end}}
{{template "footer.html"}}
